<me:UIMCT x:Class="WPFExcelReport.TZLANDEV"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    x:Name="TV"
                    Background="White"    
                    Loaded="Window_Loaded"
     >
    <me:UIMCT.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIMCT.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0">


            <WrapPanel Margin="10,10,0,0">

                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=用DllImport调用设备管理函数}}" Click="GetVerCommand"/>
                <Button Margin="10,10,0,0"  Content="{Binding Source={Localization:Translate Word=获取设备参数}}" Click="GetDevParamCommand"/>
                <Button Margin="10,10,0,0"  Content="{Binding Source={Localization:Translate Word=退出}}" Click="ExitCommand"/>
            </WrapPanel>
            <WrapPanel Margin="10,10,0,0">
                <Button Margin="10,10,0,0"  Content="{Binding Source={Localization:Translate Word=搜索设备}}" Click="SearchDevCommand"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=退出}}" Click="ExitCommand"/>
            </WrapPanel>
            <WrapPanel Margin="10,10,0,0">
                <Button Margin="10,10,0,0"  Content="{Binding Source={Localization:Translate Word=设定端口}}" Click="ServerPortCommand"/>
                <TextBox Margin="10,10,0,0"  Name="txtPort" Width="100" Text="4196"/>
            </WrapPanel>
        </StackPanel>
        <me:TZLAN ORDERNUM="{Binding PLCIP,ElementName=TV}"/>
        <DataGrid  Grid.Row="2" CanUserReorderColumns="True"  
                          FontSize="12"
                          CanUserResizeRows="True" CanUserSortColumns="True"                  
                          AutoGenerateColumns="False"   
                          EnableRowVirtualization="True"  
                          RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                          IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                          x:Name="dlgMaster" 
                  >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ABAID, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=ABAID}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=DEVNAME}" Header="{Binding Source={Localization:TranslateExtension Word=DEVNAME}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=LOCALIP}" Header="{Binding Source={Localization:TranslateExtension Word=LOCALIP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=IPMODE}" Header="{Binding Source={Localization:TranslateExtension Word=IPMODE}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=NETMASK}" Header="{Binding Source={Localization:TranslateExtension Word=NETMASK}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=LOCALIP}" Header="{Binding Source={Localization:TranslateExtension Word=LOCALIP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GATEWAY}" Header="{Binding Source={Localization:TranslateExtension Word=GATEWAY}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=DNSSERVERIP}" Header="{Binding Source={Localization:TranslateExtension Word=DNSSERVERIP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=WORKMODE}" Header="{Binding Source={Localization:TranslateExtension Word=WORKMODE}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=LOCALPORT}" Header="{Binding Source={Localization:TranslateExtension Word=LOCALPORT}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=DESTMODE}" Header="{Binding Source={Localization:TranslateExtension Word=DESTMODE}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=SERVRENAME}" Header="{Binding Source={Localization:TranslateExtension Word=DESTNAME}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=SERVERIP}" Header="{Binding Source={Localization:TranslateExtension Word=SERVERIP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=SERVERPORT}" Header="{Binding Source={Localization:TranslateExtension Word=DESTPORT}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=BAUDRATEINDEX}" Header="{Binding Source={Localization:TranslateExtension Word=BAUDRATEINDEX}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=PARITY}" Header="{Binding Source={Localization:TranslateExtension Word=PARITY}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=DATABITS}" Header="{Binding Source={Localization:TranslateExtension Word=DATABITS}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=STOPBITS}" Header="{Binding Source={Localization:TranslateExtension Word=STOPBITS}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=FLOWCONTROL}" Header="{Binding Source={Localization:TranslateExtension Word=FLOWCONTROL}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MAXPACKETLEN}" Header="{Binding Source={Localization:TranslateExtension Word=MAXPACKETLEN}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MAXTIMEGAP}" Header="{Binding Source={Localization:TranslateExtension Word=MAXTIMEGAP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=APPPROTOCOL}" Header="{Binding Source={Localization:TranslateExtension Word=APPPROTOCOL}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=RECONNECTTIME}" Header="{Binding Source={Localization:TranslateExtension Word=RECONNECTTIME}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=KEEPALIVETIME}" Header="{Binding Source={Localization:TranslateExtension Word=KEEPALIVETIME}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=WEBPORT}" Header="{Binding Source={Localization:TranslateExtension Word=WEBPORT}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=STATUS}" Header="{Binding Source={Localization:TranslateExtension Word=STATUS}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=RESOURCEIP}" Header="{Binding Source={Localization:TranslateExtension Word=RESOURCEIP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=RESOURCEPORT}" Header="{Binding Source={Localization:TranslateExtension Word=RESOURCEPORT}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VER}" Header="{Binding Source={Localization:TranslateExtension Word=VER}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=FUNCSEL}" Header="{Binding Source={Localization:TranslateExtension Word=FUNCSEL}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=FUNCSEL2}" Header="{Binding Source={Localization:TranslateExtension Word=FUNCSEL2}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=UDPGROUPIP}" Header="{Binding Source={Localization:TranslateExtension Word=UDPGROUPIP}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=DEVID}" Header="{Binding Source={Localization:TranslateExtension Word=DEVID}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=IO}" Header="{Binding Source={Localization:TranslateExtension Word=IO}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=FUNCEN}" Header="{Binding Source={Localization:TranslateExtension Word=FUNCEN}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=SERVERMODEPARAMT}" Header="{Binding Source={Localization:TranslateExtension Word=SERVERMODEPARAMT}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP0}" Header="{Binding Source={Localization:TranslateExtension Word=ZP0}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP1}" Header="{Binding Source={Localization:TranslateExtension Word=ZP1}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP2}" Header="{Binding Source={Localization:TranslateExtension Word=ZP2}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP3}" Header="{Binding Source={Localization:TranslateExtension Word=ZP3}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP4}" Header="{Binding Source={Localization:TranslateExtension Word=ZP4}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP5}" Header="{Binding Source={Localization:TranslateExtension Word=ZP5}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP6}" Header="{Binding Source={Localization:TranslateExtension Word=ZP6}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP7}" Header="{Binding Source={Localization:TranslateExtension Word=ZP7}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP8}" Header="{Binding Source={Localization:TranslateExtension Word=ZP8}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP9}" Header="{Binding Source={Localization:TranslateExtension Word=ZP9}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP1}" Header="{Binding Source={Localization:TranslateExtension Word=ZP1}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZP2}" Header="{Binding Source={Localization:TranslateExtension Word=ZP2}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=NEWUSER}" Header="{Binding Source={Localization:TranslateExtension Word=NEWUSER}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=NEWDATE}" Header="{Binding Source={Localization:TranslateExtension Word=NEWDATE}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CHGUSER}" Header="{Binding Source={Localization:TranslateExtension Word=CHGUSER}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CHGDATE}" Header="{Binding Source={Localization:TranslateExtension Word=CHGDATE}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIMCT>
